package SQL.abysnSQL;

import ErrorMsg.DBTypeNotMatchException;

public class IntegerValue extends ConstValue{
	public int integer;

	public IntegerValue(int i) {
		integer = i;
	}
	
	@Override
	public float floatValue() throws DBTypeNotMatchException {
		return (float) integer;
	}
	@Override
	public int intValue() throws DBTypeNotMatchException {
		return integer;
	}
	@Override
	public String stringValue() throws DBTypeNotMatchException {
		throw new DBTypeNotMatchException(new Exception());
	}

	public String toString() {
		try {
			return this.intValue() + "";
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
}
